package biz

import "week04/internal/service"

type UserInfo struct {
	Id   string `json:"id"`
	Name string `json:"name"`
}

func TransFromServiceUser(userInfo *service.UserInfo) *UserInfo {
	return &UserInfo{
		Id:   userInfo.Id,
		Name: userInfo.Name,
	}
}

func QueryUser(id string) *UserInfo {
	serviceUserInfo := service.QueryUser(id)
	return TransFromServiceUser(serviceUserInfo)
}
